package ${package.Queryapi};

import org.springframework.stereotype.Service;
import ${package.IQueryapi}.I${entity}QueryApi;
import ${package.Iservice}.I${entity}Service;
import javax.annotation.Resource;
import ${package.Requestdto}.${entity}ReqDto;
import ${package.Responsedto}.${entity}RespDto;
import com.dtyunxi.rest.RestResponse;
import com.github.pagehelper.PageInfo;

/**
* ${table.comment}服务实现类
*
* @author ${author}
* @since ${date}
*/
@Service
public class ${entity}QueryApiImpl implements I${entity}QueryApi {

    @Resource
    private I${entity}Service ${entity?uncap_first}Service;

    @Override
    public RestResponse<${entity}RespDto> queryById(Long id){
        return new RestResponse(${entity?uncap_first}Service.queryById(id));
    }

    @Override
    public RestResponse<PageInfo<${entity}RespDto>> queryByPage(String filter,
                                                                  Integer pageNum,
                                                                  Integer pageSize){
        return new RestResponse(${entity?uncap_first}Service.queryByPage(filter, pageNum, pageSize));
    }

}
